<template>
  <t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
  </t-image-viewer>
  <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
  </van-image-preview>
  <div class="outline-parent jy-style-height border-hover-style">
    <div class="Showroom-parent" v-if="props.info.digitalShowroom">
      <digitalShowroomInfo :url="props.info.digitalShowroom" :id="props.info.id" />
    </div>
    <img
      class="outline-parent-bg"
      :src="publicUrls + 'free/style16/Level1outlineStyle2Bg.webp'"
      alt=""
    />
    <div class="outline jy-style-height" :class="!route.meta.loopType && 'outlinePadding'">
      <div class="outline-content">
        <div class="text-box" v-if="props.info.value || props.info.remarks">
          <TextMax
            v-if="props.domShow"
            :data="props.info.remarks"
            :infoData="props.info"
            :title="props.info.text"
            :row="props.info.value ? 9 : 16"
          ></TextMax>
          <div class="cover" v-if="props.info.value" @click="ImgVisible = true">
            <div class="cover-content">
              <img class="outline-cover" :src="urls + props.info.value + '?imageView2/3/format/webp'" alt="" />
            </div>
          </div>
        </div>
        <div class="line" v-if="props.info.value || props.info.remarks"></div>
        <div class="content-tiitle" :style="!props.info.value && !props.info.remarks && { marginLeft: '0' }">
          <p class="outline-subTitle" v-if="props.info.subTitle">{{ props.info.subTitle }}</p>
          <p class="outline-Title">{{ props.info.text }}</p>
        </div>
      </div>
    </div>
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'free16Style2',
});
</script>

<script setup lang="ts">
import ExpandableText from './../../../textMode/ExpandableText.vue';
import digitalShowroomInfo from '@/freeComponents/unitdigitalShowroom/style16.vue';
import { publicUrls } from '@/utils/minxin';
import { textType } from '@/utils/minxin';
import { urls } from '@/utils/request/upload';
import { defineComponent, nextTick, ref } from 'vue';
import TextMax from '@/freeComponents/textMode/TextMax.vue';
import { useProjectStore } from '@/store';
import { useRoute } from 'vue-router';
const store = useProjectStore();
const ImgVisible = ref(false);
const route = useRoute();

const props = defineProps({
  info: {
    type: Object,
  },
  domShow: {
    type: Boolean,
  },
});
// 跳转全景链接
const open = (url: any) => {
  if (url) {
    window.open(url, '_blank');
  }
};
</script>

<style scoped lang="less">
.outline-parent {
  position: relative;
  margin-top: 0;
  margin-right: 280px;
}
.outline-parent-bg {
  width: 532px;
  height: calc(100%);
  position: relative;
  z-index: 20;
}
.Showroom-parent {
  position: absolute;
  top: 135px;
  right: 102px;
  z-index: 23;
}
.outlinePadding {
  padding-top: 156px !important;
  .outline-content {
    height: 670px !important;
  }
}
.outline {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 22;
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 170px;
}
.outline-content {
  width: 100%;
  height: 690px;
  padding-left: 70px;
  padding-right: 102px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.content-tiitle {
  width: 130px;
  height: 600px;
  display: flex;
  justify-content: center;
  margin-left: 38px;
  padding-top: 20px;
  position: relative;
  &::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: url(https://static.jiyi.show/free/style16/Level1outlineStyle2Title.webp) no-repeat center/100% 100%;
    top: 0;
  }
  .outline-Title {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 4px;
    font-family: SourceHanSerifCN-Bold;
    font-size: 32px;
    line-height: 32px;
    color: #555;
  }
  .outline-subTitle {
    height: 460px;
    font-family: SourceHanSerifCN;
    font-size: 18px;
    line-height: 24px;
    color: #555;
    writing-mode: vertical-rl;
    text-orientation: upright;
    margin-right: 20px;
    position: relative;
    padding-top: 40px;
    letter-spacing: 4px;
    &::after {
      content: '';
      position: absolute;
      width: 1px;
      height: 38px;
      background: #555;
      right: 11px;
      top: 0;
    }
  }
}
.line {
  width: 4px;
  height: 100%;
  background: #f7f1df;
}
.text-box {
  width: 170px;
  height: 690px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  margin-right: 18px;
  padding-top: 98px;
  padding-bottom: 80px;
  position: relative;
  &::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: url(https://static.jiyi.show/free/style16/Level1outlineStyle2Title.webp) no-repeat center/100% 100%;
    bottom: 58px;
  }
}
.cover {
  width: 100%;
  flex: 1;
  margin-top: 14px;
  .cover-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
    &:hover img {
      transform: scale(1.2);
    }
    .outline-cover {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: all 0.3s ease;
    }
  }
}

::v-deep .van-text-ellipsis {
  font-family: PingFang SC !important;
  font-size: 16px !important;
  color: #333 !important;
  line-height: 32px !important;
}
::v-deep .van-text-ellipsis__action::before {
  color: #333 !important;
  font-weight: 800 !important;
}
</style>